package com.permission.vo;

import lombok.Data;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by Administrator on 2018/4/2
 */
@Data
public class ResultVo<T> {

    /* 代码 */
    private Integer code;

    /* 信息 */
    private String msg;

    /* 内容 */
    private T data;

    public Map<String, Object> toMap() {
        HashMap<String, Object> result = new HashMap<>();
        result.put("code", this.code);
        result.put("msg", this.msg);
        result.put("data", this.data);
        return result;
    }

}
